// 函数签名
type DescribableFunction = {
    description: string
    (someArg: number): boolean
}

function doSomething(fn: DescribableFunction) {
    console.log(fn.description + ' returned ' + fn(6))
}

// 函数签名可以用于函数类型别名，也可以用于接口
function myFunc(someArg: number): boolean {
    return true
}

myFunc.description = 'This is my function'

doSomething(myFunc) // This is my function returned true